import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const state = {
    isLoading: false,
    direction: 'forward'
}
const store = new Vuex.Store({
    state,
    mutations: {
        UPDATE_LOADING_STATUS (state, payload) {
            state.isLoading = payload.isLoading
        },
        UPDATE_DIRECTION (state, payload) {
            state.direction = payload.direction
        }
    }
})
export default store
